package com.tjshop.android.adapter;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.tjshop.android.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.tjshop.android.EventDetailActivity;
import com.tjshop.android.model.activityInfo;
import com.tjshop.android.model.Comment;
import com.tjshop.android.util.ImageLoaderUtils;
import com.tjshop.android.view.CircleImageView;

import java.util.List;

/**
 * Created by gytaiSSD on 2015/1/15.
 */
public class pinglun_adapter extends BaseAdapter {
	private LayoutInflater inflater;
	List<Comment> activityList;
	private Context mContext;

	public pinglun_adapter(Context context, List<Comment> clist,
			LayoutInflater inflater) {
		this.inflater = inflater;
		activityList = clist;
		this.mContext = context;
	}

	@Override
	public int getCount() {
		return activityList.size();
	}

	@Override
	public Object getItem(int i) {
		return activityList.get(i);
	}

	@Override
	public long getItemId(int i) {
		return i;
	}

	@Override
	public View getView(int i, View view, ViewGroup viewGroup) {
		view = inflater.inflate(R.layout.activity_pinglun_item, null);
		CircleImageView img = (CircleImageView) view
				.findViewById(R.id.Heading_image);
		TextView username = (TextView) view.findViewById(R.id.userName);
		TextView content = (TextView) view.findViewById(R.id.pinglun_content);
//		username.setText(activityList.get(i).getUser_nick());
//		content.setText(activityList.get(i).getContent());
//		ImageLoaderUtils.getInstance(mContext).displayImage(
//				activityList.get(i).getHeader(), img);
		return view;
	}
}
